package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;

public class OswDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("abc.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        osw.write("加油");
        osw.write("China");
        osw.write("加油");
        osw.write("华为");
        System.out.println("写出完毕");
        osw.close();
    }
}

